import './assets/main.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

// 导入全局样式
// import './styles/variables.scss'
// import './styles/mixins.scss'
// import './styles/elmentui.scss'
// import './styles/global.scss'

// 导入Font Awesome核心库和所有需要的图标
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

// 导入所有路由中使用的图标（根据你的路由配置添加）
import {
  faComments, faHome, faUser, faCog, faBell,
  faEdit, faArchive, faFolder, faTags, faCommentDots,
  faImages, faFire, faUserFriends, faInfoCircle, faDownload
} from '@fortawesome/free-solid-svg-icons'

// 将图标添加到库中
library.add(
  faComments, faHome, faUser, faCog, faBell,
  faEdit, faArchive, faFolder, faTags, faCommentDots,
  faImages, faFire, faUserFriends, faInfoCircle, faDownload
)

const app = createApp(App)
const pinia = createPinia()

// 全局注册FontAwesomeIcon组件
app.component('font-awesome-icon', FontAwesomeIcon)

// 正确初始化（移除重复调用）
app.use(pinia)
app.use(router)
app.use(ElementPlus)

app.mount('#app')
